  {% extends "layout.html" %}

{% block title %}Détail du client{% endblock %}

{% block content %}



<form method="post" class="form-horizontal">

		<div class="form-actions">
                              
                                           
                      <button type="submit" class="btn btn-primary" name="action" value="update">Mise à jour du compte client</button>
                     
					  
                      
    <div class="btn-group">
					  <a class="btn dropdown-toggle" data-toggle="dropdown" href="#">
						Actions
						<span class="caret"></span>
					  </a>

						<ul class="dropdown-menu">
							
                            <li><a href="liste-client"><i class="icon-eye-open"></i> Afficher la liste des clients</a></li>
                         <li class="divider"></li>
                        	 {% if not(session.niveauAuth=='2' or session.niveauAuth=='5' or session.niveauAuth=='6') %}
                            <li><a href="detail-offre-client-fixe?id={{client.code_client_hto}}"><i class="icon-eye-open"></i> Détail offre fixe</a></li>
							 <li><a href="detail-offre-client-internet?id={{client.code_client_hto}}"><i class="icon-eye-open"></i> Détail offre internet</a></li>
							 {% endif %}
							 {% if (session.niveauAuth=='1')or(session.niveauAuth=='5')or(session.niveauAuth=='2')or(session.niveauAuth=='4')or(session.niveauAuth=='6') %}
                              <li><a href="detail-offre-client-mobile?id={{client.code_client_hto}}"><i class="icon-eye-open"></i> Détail parc mobile</a></li>
                              <li class="divider"></li>
                              <li><a href="creation-commande?code_client_hto={{client.code_client_hto}}"><i class="icon-shopping-cart"></i> Créer une commande</a></li>
							{% endif %}
							
					  </ul>
					</div>
                    </div>

	<div class="row">
	
	 <!-- Première colonne -->
	<div class="span5">
	
	  <fieldset>
		<legend>Informations générales</legend>

	  <div class="control-group">
		<label class="control-label" for="code_client_hto">Code client</label>
		<div class="controls">
		
		<div class="input-prepend">
		   <span class="add-on"><i class="icon-user"></i></span>
	
           <input name="code_client_hto" type="text" value="{{client.code_client_hto}}" class="uneditable-input"/> 
    
		</div>
		  
		</div>
	  </div>
	  {% if not(session.niveauAuth=='5')and not(session.niveauAuth=='2')and not(session.niveauAuth=='3')and not(session.niveauAuth=='4')and not(session.niveauAuth=='6') %}
	  <div class="control-group">
	
		<label class="control-label" for="code_client_voip">Code client voip</label>
	
        <div class="controls">
		<div class="input-prepend">
		   <span class="add-on"><i class="icon-user"></i></span>
		   
           <input name="code_client_voip" type="text" value="{{client.code_client_voip}}"/> 
      
		</div>
	  </div>
	  </div>
      
		<div class="control-group">
		<label class="control-label" for="code_client_mobile">Code client mobile</label>
        <div class="controls">
		<div class="input-prepend">
		   <span class="add-on"><i class="icon-user"></i></span>
		
           <input name="code_client_mobile" type="text" value="{{client.code_client_mobile}}"/> 
       
		</div>
	  </div>
	  
	  </div>
       {% endif %}
	   <div class="control-group">
		<label class="control-label" for="fj">Forme Juridique</label>
		<div class="controls">
		   <select name="fj" size="1">
           
			  <option value="EURL" {% if client.forme_juridique== "EURL" %}selected{% endif %}>EURL</option>
			  <option value="SARL" {% if client.forme_juridique== "SARL" %}selected{% endif %}>SARL</option>
			  <option value="SAS" {% if client.forme_juridique== "SAS" %}selected{% endif %}>SAS</option>
			  <option value="EI" {% if client.forme_juridique== "EI" %}selected{% endif %}>EI</option>
             
			</select>
		</div>
	  </div>
	  
	   <div class="control-group">
		<label class="control-label" for="rs">Raison Social</label>
		<div class="controls">
		 
           <input name="rs" type="text" value="{{client.raison_social}}"/> 
         
		</div>
	  </div>
      
         <div class="control-group">
     
		<label class="control-label" for="activite">Activité</label>
		<div class="controls">
		   <input name="activite" type="text" value="{{client.activite}}"/> 
		</div>
	  </div>
	  
	   <div class="control-group">
		<label class="control-label" for="siret">Siret</label>
		<div class="controls">
		
           <input name="siret" type="text" value="{{client.siret}}"/> 
      
		</div>
	  </div>
	  
	   <div class="control-group">
		<label class="control-label" for="ape">APE</label>
		<div class="controls">
		 
           <input name="ape" type="text" value="{{client.ape}}"/> 
           
		</div>
	  </div>
	
	   <div class="control-group">
		<label class="control-label" for="rcs">RCS</label>
		<div class="controls">
		
           <input name="rcs" type="text" value="{{client.rcs}}"/> 
           
		</div>
	  </div>

	  <div class="control-group">
     
		<label class="control-label" for="rue">Rue*</label>
		<div class="controls">
		  
           <input name="rue" type="text" value="{{client.adresse}}"/> 
          
		</div>
	  </div>
	  
	   <div class="control-group">
		<label class="control-label" for="cp">Code postal*</label>
		<div class="controls">
		
           <input name="cp" type="text" value="{{client.cp}}"/> 
           
		</div>
	  </div>
	  
	  <div class="control-group">
		<label class="control-label" for="ville">Ville*</label>
		<div class="controls">
		
           <input name="ville" type="text" value="{{client.ville}}"/>
            
		</div>
	  </div>

		
	  <div class="control-group">
		<label class="control-label" for="pays">Pays*</label>
		<div class="controls">
		
           <input name="pays" type="text" value="{{client.pays}}"/>
            
		</div>
	  </div>
	  
		<div class="control-group">
		<label class="control-label" for="fixe">Téléphone Fixe*</label>
		<div class="controls">
		
           <input name="fixe" type="text" value="{{client.tel_fix}}"/> 
           
		</div>
	  </div>
	  
	   <div class="control-group">
		<label class="control-label" for="fax">Fax</label>
		<div class="controls">
		
           <input name="fax" type="text" value="{{client.tel_fax}}"/> 
           
		</div>
	  </div>
      
      <div class="control-group">
		<label class="control-label" for="site_internet">Site internet</label>
		<div class="controls">
        <div class="input-prepend">
		   <span class="add-on"><i class="icon-bookmark"></i></span>
		 
           <input name="site_internet" type="text" value="{{client.site_internet}}"/> 
           
		</div>
	  </div>
	  </div>
	   <div class="control-group">
		<label class="control-label" for="couriel">Email société*</label>
		<div class="controls">
        <div class="input-prepend">
		   <span class="add-on"><i class="icon-envelope"></i></span>
		 
           <input name="couriel" type="text" value="{{client.email}}"/>
            
		</div>
	  </div>     
      
      
  </fieldset>
  
  
  	<fieldset>
  	<div class="control-group">
		<label class="control-label" for="vendeur">Vendeur</label>
		<div class="controls">
		   <input name="vendeur" type="text" value="{{client.vendeur}}"/> 
		</div>
	  </div>
  	
	<legend>Gestionnaire</legend>

	<div class="control-group">
		<label class="control-label" for="civilite">Civilité</label>
		<div class="controls">
		   <select name="civilite" size="1">
			<option value="Monsieur" {% if client.civilite== "Monsieur" %}selected{% endif %}>Monsieur</option>
			  <option value="Madame" {% if client.civilite== "Madame" %}selected{% endif %}>Madame</option>
			  <option value="Madmoiselle" {% if client.civilite== "Madmoiselle" %}selected{% endif %}>Madmoiselle</option>
			  <option value="Maître" {% if client.civilite== "Maître" %}selected{% endif %}>Maître</option>
			  <option value="Docteur" {% if client.civilite== "Docteur" %}selected{% endif %}>Docteur</option>
			</select>
		</div>
	  </div>

	  <div class="control-group">
		<label class="control-label" for="nom">Nom*</label>
		<div class="controls">
		
           <input name="nom" type="text" value="{{client.nom}}"/> 
           
		</div>
	  </div>	

	  <div class="control-group">
		<label class="control-label" for="prenom">Prénom*</label>
		<div class="controls">
		 
           <input name="prenom" type="text" value="{{client.prenom}}"/>
            
		</div>
	  </div>	
	  
	   <div class="control-group">
		<label class="control-label" for="mobile">Téléphone Portable</label>
		<div class="controls">
		
           <input name="mobile" type="text" value="{{client.tel_mobile}}"/> 
           
		</div>
	  </div>
      
       <div class="control-group">
		<label class="control-label" for="email_gest">Email</label>
		<div class="controls">
        <div class="input-prepend">
        <span class="add-on"><i class="icon-envelope"></i></span>
		   <input name="email_gest" type="text" value="{{client.email_gest}}"/> 
		</div>
        </div>
	  
	  

	</fieldset>
	
  </div>
  
  
  <!-- Deuxième colonne -->
  
  <div class="span6">
  
  <fieldset>
	<legend>Adresse de livraison (si différente) </legend>

	
	  <div class="control-group">
      
		<label class="control-label" for="nom">Raison Social</label>
		<div class="controls">
		   <input name="raison_social_dif" type="text" value="{{client.raison_social_dif}}"/> 
		</div>
	  </div>	

	  <div class="control-group">
     
		<label class="control-label" for="prenom">Adresse</label>
		<div class="controls">
		   <input name="adresse_dif" type="text" value="{{client.adresse_dif}}"/> 
		</div>
	  </div>
        <div class="control-group">
		<label class="control-label" for="cp_dif">Code postal </label>
		<div class="controls">
		   <input name="cp_dif" type="text" value="{{client.cp_dif}}"/> 
		</div>
	  </div>
        <div class="control-group">
		<label class="control-label" for="ville_dif">Ville </label>
		<div class="controls">
		   <input name="ville_dif" type="text" value="{{client.ville_dif}}"/> 
		</div>
	  </div>	
	  
	   <div class="control-group">
		<label class="control-label" for="telephone_dif">Téléphone </label>
		<div class="controls">
		   <input name="telephone_dif" type="text" value="{{client.telephone_dif}}"/> 
		</div>
	  </div>
	  
	  
	</fieldset>
  
  
  
	<fieldset>
	<legend>Mode de paiement</legend>


	  <div class="control-group">
		<label class="control-label" for="mode_paiement">Mode paiement*</label>
		<div class="controls">
		  <select name="mode_paiement" size="1">
		  	<option value="Prélévement" {% if client.mode_paiement== "Prélévement" %}selected{% endif %}>Prélévement</option>
			<option value="Chèque" {% if client.mode_paiement== "Chèque" %}selected{% endif %}>Chèque</option>
			<option value="Virement" {% if client.mode_paiement== "Virement" %}selected{% endif %}>Virement</option>
			<option value="Mandat administratif" {% if client.mode_paiement== "Mandat administratif" %}selected{% endif %}>Mandat administratif</option>
		 </select>
		</div>
	  </div>

	  <div class="control-group">
		<label class="control-label" for="banque">Etablisement bancaire*</label>
		<div class="controls">
		
           <input name="banque" type="text" value="{{client.banque}}"/>
            
		</div>
	  </div>
	  
	  	<div class="control-group">
        <label class="control-label" for="adresse_bq">Adresse</label>
		<div class="controls">
		 
           <input name="adresse_bq" type="text" value="{{client.adresse_bq}}"/> 
           
		</div>
	  </div>

  	  	<div class="control-group">
      	<label class="control-label" for="cp_banque">Code postal</label>
		<div class="controls">
		 
           <input name="cp_banque" type="text" value="{{client.cp_banque}}"/> 
           
		</div>
	  </div>
	  
  	  <div class="control-group">
		<label class="control-label" for="ville_bq">Ville</label>
		<div class="controls">
		
           <input name="ville_bq" type="text" value="{{client.ville_bq}}"/> 
           
		</div>
	  </div>

<div class="control-group">
		<label class="control-label" for="code_iban">Code IBAN</label>
		<div class="controls">
		  
           <input name="code_iban" type="text" value="{{client.code_iban}}" /> 
           
		</div>
	  </div>
  
  	  <div class="control-group">
		<label class="control-label" for="code_etablissement">Code établissement</label>
		<div class="controls">
		  
           <input name="code_etablissement" type="text" value="{{client.code_etablissement}}"/> 
           
		</div>
	  </div>

      <div class="control-group">
		<label class="control-label" for="code_guichet">Code guichet</label>
		<div class="controls">
		 
           <input name="code_guichet" type="text" value="{{client.code_guichet}}"/> 
           
		</div>
	  </div>

      <div class="control-group">
		<label class="control-label" for="num_compte">Numéro de compte</label>
		<div class="controls">
		 
           <input name="num_compte" type="text" value="{{client.num_compte}}"/> 
           
		</div>
	  </div>
	  
      <div class="control-group">
		<label class="control-label" for="rib">Clé RIB</label>
		<div class="controls">
		 
           <input name="rib" type="text" value="{{client.rib}}"/> 
           
		</div>
	  </div>
	  <div class="control-group">
     
		<label class="control-label" for="swift">Clé Swift ou BIC</label>
		<div class="controls">
		   <input name="swift" type="text" value="{{client.swift}}"/> 
		</div>
	  </div>
      
      <div class="control-group">
     
		<label class="control-label" for="facture_detail">Pas de Détail sur Facture</label>
		<div class="controls">
		  
		   <input name="facture_detail" type="checkbox" id="facture_detail"  value="x" {% if client.facture_detail == "x" %}checked="checked"{% endif %}/>
		   
		</div>
	  </div>
	  
	</fieldset>

<br>
	</fieldset>
	  

	</div>
	</div>
    

   
		<div class="form-actions">
                              
                                           
                      <button type="submit" class="btn btn-primary" name="action" value="update">Mise à jour du compte client</button>
                     
					  
                      
    <div class="btn-group">
					  <a class="btn dropdown-toggle" data-toggle="dropdown" href="#">
						Actions
						<span class="caret"></span>
					  </a>

						<ul class="dropdown-menu">
							
                            <li><a href="liste-client"><i class="icon-eye-open"></i> Afficher la liste des clients</a></li>
                         <li class="divider"></li>
                            {% if not(session.niveauAuth=='2' or session.niveauAuth=='5' or session.niveauAuth=='6') %}
                            <li><a href="detail-offre-client-fixe?id={{client.code_client_hto}}"><i class="icon-eye-open"></i> Détail offre fixe</a></li>
							 <li><a href="detail-offre-client-internet?id={{client.code_client_hto}}"><i class="icon-eye-open"></i> Détail offre internet</a></li>
                            {% endif %}
                            {% if (session.niveauAuth=='1')or(session.niveauAuth=='5')or(session.niveauAuth=='2')or(session.niveauAuth=='4')or(session.niveauAuth=='6') %}
                              <li><a href="detail-offre-client-mobile?id={{client.code_client_hto}}"><i class="icon-eye-open"></i> Détail parc mobile</a></li>
                              <li><a href="creation-commande?code_client_hto={{client.code_client_hto}}"><i class="icon-shopping-cart"></i> Créer une commande</a></li>
                              <li class="divider"></li>
							{% endif %}
							
					  </ul>
					</div>
                    </div>
   


    
   </form> 
    
		
		
	
</form>

{% endblock %}
	
